package il.ac.biu.cs.grossmm.api.simple;

import javax.activation.MimeType;

/**
 * Represents a MIME object to serve as a payload for NOTIFY
 * requests.
 */
public class Payload {
	final byte[] bytes;

	final MimeType mimeType;

	/**
	 * Constructs a new payload by content and content type
	 * @param bytes the content
	 * @param mimeType content type
	 */
	public Payload(byte[] bytes, MimeType mimeType) {
		this.bytes = bytes;
		this.mimeType = mimeType;
	}

	/**
	 * Gets the content as array of bytes.
	 * @return the content as array of bytes
	 */
	public byte[] getBytes() {
		return bytes;
	}

	/**
	 * Gets content type for this payload.
	 * @return content type for this payload
	 */
	public MimeType getMimeType() {
		return mimeType;
	}

}
